<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<script type="text/javascript">

		// ajax calling
		function goConvert(form)	{			
			submitPost(form, numericCallback);
		}
		
		// callback function
		function numericCallback(data){
			//alert(data.viewBinaryFormat);
			$("#decimal").html(data.decimal);
			$("#convBinary").html(data.convBinary);
			$("#convOctal").html(data.convOctal);
			$("#convHeximal").html(data.convHeximal);
			$("#viewDecimalFormat").html(data.viewDecimalFormat);
			$("#viewBinaryFormat").html(data.viewBinaryFormat);
		}


</script>
</head>
<h1>${title}</h1>
<form name="numericForm" action="./numeric" method="post">

    <table width="60%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="30%" class="HeadCol">값 입력</td>
        <td class="ListCol"><textarea id="left_area" name="input" rows="3" cols="100%"></textarea></td>
       </tr>
    </table>    
    <p class="Margin5"/>    
    <table width="60%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center">
        <table border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td class="bt02_L">&nbsp;</td>
              <td class="bt02_bg02"><a href="javascript:goConvert(document.numericForm);"><img src="img/btn_dn.gif" width="13" height="13" /></a></td>
              <td class="bt02_bg"><a href="javascript:goConvert(document.numericForm);" class="bt01">변환</a></td>
              <td class="bt02_R">&nbsp;</td>
            </tr>
        </table>
        </td>
      </tr>
    </table>    
    <p class="Margin15"/>    
    <table width="60%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td class="subTitle">변환 결과</td>
            </tr>
        </table></td>
      </tr>
    </table>    
    <p class="Margin5"/>
    <table width="60%"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td valign="top" class="box02"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="20%" class="HeadCol02">메소드 명</td>
            <td width="20%" class="HeadCol02" colspan="2">메소드</td>
            <td class="HeadCol02">변환 결과 값</td>
          </tr>
          <tr>
            <td class="ListCol02">기준 값</td>
            <td class="ListCol02" colspan="2">Decimal(10진수)</td>
            <td class="ListCol02_L" id="decimal"></td>
          </tr>          
          <tr>
            <td class="ListCol02">Binary(2진수) 변환</td>
            <td class="ListCol02_L">String</td>
            <td class="ListCol02_L"><b>convBinary</b>(int nDecimal)</td>
            <td class="ListCol02_L" id="convBinary"></td>
          </tr>
           <tr>
            <td class="ListCol02">Octal(8진수) 변환</td>
            <td class="ListCol02_L">String</td>
            <td class="ListCol02_L"><b>convOctal</b>(int nDecimal)</td>
            <td class="ListCol02_L" id="convOctal"></td>
          </tr>
          <tr>
            <td class="ListCol02">Heximal(16진수) 변환</td>
            <td class="ListCol02_L">String</td>
            <td class="ListCol02_L"><b>convHeximal</b>(int nDecimal)</td>
            <td class="ListCol02_L" id="convHeximal"></td>
          </tr>
          <tr>
            <td class="ListCol02">Decimal 포맷변환</td>
            <td class="ListCol02_L">int[]</td>
            <td class="ListCol02_L"><b>viewDecimalFormat</b>(byte[] bBytes)</td>
            <td class="ListCol02_L" id="viewDecimalFormat"></td>
          </tr>          
          <tr>
            <td class="ListCol02">Binary 포맷 변환</td>
            <td class="ListCol02_L">String[]</td>
            <td class="ListCol02_L"><b>viewBinaryFormat</b>(byte[] bBytes)</td>
            <td class="ListCol02_L" id="viewBinaryFormat"></td>
          </tr>           
        </table></td>
      </tr>
    </table>

    


